package com.zhengqing.design.create.singleton;

/**
 * <p> 静态内部类 </p>
 *
 * @author zhengqingya
 * @description
 * @date 2022/12/21 17:05
 */
public class Singleton05 {

    /**
     * 私有构造方法
     */
    private Singleton05() {
    }

    /**
     * 取实例的方法
     */
    public static Singleton05 getInstance() {
        return LazyHolder.INSTANCE;
    }

    /**
     * 私有静态内部类
     */
    private static class LazyHolder {
        private static final Singleton05 INSTANCE = new Singleton05();
    }
}
